package main

import (
	"crypto/sha256"
	"fmt"
)

func main() {
	//var a [3]int
	//a := [3]int{1, 2, 3}
	//a := [3]int{1, 2}
	a := [...]int{1, 2, 3, 4}
	fmt.Println(a[0])
	fmt.Println(a[len(a)-1])
	//输出索引和元素
	for k, v := range a {
		fmt.Println(k, v)
	}

	//仅输出元素
	for _, v := range a {
		fmt.Println(v)
	}

	c1 := sha256.Sum256([]byte("x"))
	c2 := sha256.Sum256([]byte("X"))
	fmt.Printf("%x\n%x\n%t\n%T\n", c1, c2, c1 == c2, c1)
}
